package com.iyjhsoc.game.controller;

import com.iyjhsoc.game.domain.VO.PlayerChooseVO;
import com.iyjhsoc.game.domain.dto.CompetitionSmallTeamInfoDTO;
import com.iyjhsoc.game.domain.dto.PlayerChooseDTO;
import com.iyjhsoc.game.domain.response.Response;
import com.iyjhsoc.game.service.PlayerChooseService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("iyj/player/choose")
@RestController
public class PlayerChooseController {

    @Resource
    PlayerChooseService playerChooseService;

    @GetMapping("getGameChoose")
    @ApiModelProperty("单局游戏BP")
    public Response getGameChoose(PlayerChooseVO vo){
        List<CompetitionSmallTeamInfoDTO> gameChoose = playerChooseService.getGameChoose(vo);
        return Response.SUCCESS(gameChoose);
    }

    @GetMapping("getSmallGamePlayerInfoById")
    @ApiModelProperty("查询对局选手信息")
    public Response getSmallGamePlayerInfoById(String smallGameId){
        return playerChooseService.getSmallGamePlayerInfoById(smallGameId);
    }

    @PostMapping("getMatchPlayerData")
    @ApiModelProperty("获取选手比赛信息")
    public Response getMatchPlayerData(@RequestBody PlayerChooseVO vo){
        Response matchPlayerData = playerChooseService.getMatchPlayerData(vo);
        return matchPlayerData;
    }


}

